package com.clb.timetools;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.VerticalFlowLayout;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentFactory;

import groovyjarjarantlr4.v4.runtime.misc.NotNull;

import javax.swing.*;

public class TimeToolsWindowFactory implements ToolWindowFactory {

    @Override
    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        // 创建独立的 UI 类
        TimeToolsWindow window = new TimeToolsWindow();

        // 将其包装成 Content 并添加到 ToolWindow
        Content content = ContentFactory.getInstance().createContent(window, "", false);
        toolWindow.getContentManager().addContent(content);
    }
}
